import request from "@/utils/request";

// 查询登录日志列表
export function list(query) {
  return request({
    url: "/v1/system/logininfor/list",
    method: "get",
    params: query,
  });
}

// 删除登录日志
export function delLogininfor(info_id) {
  return request({
    url: "/v1/system/logininfor/delete",
    method: "post",
    data: { info_id },
  });
}

export function delLogininforByIds(ids) {
  return request({
    url: "/v1/system/logininfor/deleteByIds",
    method: "post",
    data: { ids },
  });
}

// 解锁用户登录状态
export function unlockLogininfor(user_number) {
  return request({
    url: "/v1/system/logininfor/unlock/" + user_number,
    method: "get",
  });
}

// 清空登录日志
export function cleanLogininfor() {
  return request({
    url: "/v1/system/logininfor/clean",
    method: "delete",
  });
}
